import request from "@/utils/request";
import current from "element-ui/packages/table/src/store/current";

//获取所有员工
export const getAllEmployee = () => request.get('/employee/getAll')
//分页获取员工列表
export const getEmployeeListByPage = (current, size) => request.get('/employee/getByPage/' + current + '/' + size)
//根据手机号逻辑删除员工
export const dismissEmployeeByPhone = phone => request.delete('/employee/dismiss/' + phone)
//查询所有教练
export const getAllCoach = () => request.get('/employee/getAllCoach')
//查询所有检修员
export const getAllMaintainer = () => request.get('/employee/getAllMaintainer')
//添加新员工
export const saveNewEmployee = (employee) => request.post('/employee/saveEmployee', employee)
//分页获取考勤信息
export const getTodayAttend = (current, size) => request.get('/attendance/getByTodayPage/' + current + '/' + size)
//员工签到
export const attend = data => request.post('/attendance/clock', data)
//指定时间获取员工打卡信息
export const getAttendByTime = (current, size, start, end) => request.get('/attendance/getAllAttendance/' + current + '/' + size + '/' + start + '/' + end)
//创建今日考勤表
export const createTodayAttend = () => request.post('/attendance/saveAttendance')
//修改员工信息
export const updateEmployee = emp => request.put('/employee/updateEmployee', emp)
// 获取教练信息
export const getCoachByPage = (current, size) => request.get('/employee/getCoachByPage/' + current + '/' + size)